home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1039 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  923 b 

  1. Date: 10 Jan 1996 22:03:16 EST
  2. Path: gcomm.com!jackal
  3. Newsgroups: comp.lang.c
  4. From: jackal@gcomm.com (Jack Alvrus)
  5. Message-ID: <8213293982604@demosys.gcomm.com>
  6. Organization: Galacticomm, Inc.
  7. Subject: stricmp()
  8.  
  9.  
  10. Here's a fun question for ya':
  11.  
  12. stricmp() is an ANSI library function, right?  So it should exhibit, if
  13. not consistent, at least *documented* behavior, right?
  14.  
  15. So, is stricmp("a","^") always less than zero or greater than zero, and
  16. if neither, is there any documented behavior in this case?
  17.  
  18. I ask because '^' is *between* 'A' and 'a' in ASCII.  So if stricmp()
  19. always compares to upper case letters, stricmp("a","^") is always less
  20. than zero.  If it always compares to lower case letters,
  21. stricmp("a","^") is always *greater* than zero.
  22.  
  23. My compiler's reference manual does not say one way or another, but a
  24. quick test showed stricmp("a","^") < 0.
  25.  
  26. Any comments?
  27.  
  28.  Jack Alvrus
  29.  Galacticomm Software Engineer
  30.